<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:p="http://xmlns.jcp.org/jsf/passthrough"
      >
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta charset="utf-8"/>
        <!-- Title and other stuffs -->
        <title>Login</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <meta name="author" content=""/>

        <!-- Stylesheets -->
        <link href="style/bootstrap.css" rel="stylesheet"/>
        <link rel="stylesheet" href="style/font-awesome.css"/>
        <link href="style/style.css" rel="stylesheet"/>


        <!-- HTML5 Support for IE -->
        <!--[if lt IE 9]>
        <script src="js/html5shim.js"></script>
        <![endif]-->

        <!-- Favicon -->
        <link rel="shortcut icon" href="img/favicon/favicon.png"/>

    </h:head>



    <h:body>

        <!-- Form area -->
        <div class="admin-form">
            <div class="container">

                <div class="row">
                    <div class="col-md-12">
                        <!-- Widget starts -->
                        <div class="widget worange">
                            <!-- Widget head -->
                            <div class="widget-head">
                                <i class="icon-lock"></i> Login 
                            </div>

                            <div class="widget-content">
                                <div class="padd">
                                    <!-- Login form -->
                                    <h:form class="form-horizontal" id="formLogin">
                                        <!-- Email -->
                                        <div class="form-group">
                                            <label class="control-label col-lg-3" for="inputEmail">#{msg.usuario}</label>
                                            <div class="col-lg-9">
                                                <h:inputText  class="form-control" p:type="text" id="inputEmail" p:placeholder="Usuario"  value="#{ctrSession.usuario}" />

                                            </div>
                                        </div>
                                        <!-- Password -->
                                        <div class="form-group">
                                            <label class="control-label col-lg-3" for="inputPassword">#{msg.password}</label>
                                            <div class="col-lg-9">
                                                <h:inputText  class="form-control" p:type="password" id="inputPassword" p:placeholder="Password"  value="#{ctrSession.password}" />

                                            </div>
                                        </div>
                                        <!-- Remember me checkbox and sign in button -->
                                        <div class="form-group">
                                            <div class="col-lg-9 col-lg-offset-3">
                                                <div class="checkbox">
                                                    <label>
                                                        <input type="checkbox"/> Remember me
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <rich:messages  ajaxRendered="true" />
                                        <div class="col-lg-9 col-lg-offset-3">
                                            
                                            <h:commandButton p:type="submit" class="btn btn-danger" action="#{ctrSession.login()}"  value="Sing In"/>
                                            <h:commandButton p:type="submit" class="btn btn-default" action="#{ctrSession.resetearCamposLogin}" immediate="true"  value="Reset"/>
                                           
                                        </div>
                                        
                                        <br />
                                       
                                    </h:form>

                                </div>
                            </div>
                            
                            <div class="widget-foot">
                                
                                No estàs Registrado? <a href="/SistemaDefectos/faces/pub/register.xhtml">Registrate Aqui.</a>
                            </div>
                        </div>  
                    </div>
                </div>
            </div> 
        </div>



        <!-- JS -->
        <script src="js/jquery.js"></script>
        <script src="js/bootstrap.js"></script>
    </h:body>
</html>